//
//  KCMeViewController.swift
//  S0002_NavigationController
//
//  Created by yao_yu on 14-9-1.
//  Copyright (c) 2014年 yao_yu. All rights reserved.
//

import UIKit

class KCMeViewController: UIViewController {
    
    var userInfo = ""

    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        setupViews()
    }
    
    func setupViews(){
        var lblUserInfo = UILabel(frame: CGRectMake(0, 100, 320, 30))
        lblUserInfo.textAlignment = NSTextAlignment.Center
        lblUserInfo.textColor = UIColor(red: 23/255.0, green: 180/255.0, blue: 237/255.0, alpha: 1)
        view.addSubview(lblUserInfo)
        
        let btnClose = UIButton.buttonWithType(UIButtonType.System) as UIButton
        btnClose.frame = CGRectMake(110, 200, 100, 30)
        btnClose.setTitle("关闭", forState: UIControlState.Normal)
        btnClose.addTarget(self, action: "close", forControlEvents: UIControlEvents.TouchUpInside)
        view.addSubview(btnClose)

        lblUserInfo.text = userInfo
}

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepareForSegue(segue: UIStoryboardSegue!, sender: AnyObject!) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

    func close(){
        dismissViewControllerAnimated(true, completion: nil)
    }
}
